package com.spring.vencent.factory;

import java.util.Hashtable;

import javax.naming.Context;
import javax.naming.Name;
import javax.naming.Reference;
import javax.naming.spi.ObjectFactory;

import com.spring.vencent.service.impl.LogServiceImpl;

/**
 * 服务创造者， spi
 * @author 1d
 *
 */
public class LogServiceFactory implements ObjectFactory{

	@Override
	public Object getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable<?, ?> environment)
			throws Exception {
		if(obj instanceof Reference){
			LogServiceImpl log = new LogServiceImpl();
			return log;
		}
		return null;
	}

}
